<nav class="header-nav js-header-nav" role="navigation" aria-label="Main navigation">
    <ul class="navigation-list horizontal">
        {%- assign nav_list = site.data.nav.items -%}
        {%- for node in nav_list -%}
        <li class="header-navigation-list-item">
            {%- assign page_url_segments = page.url | split: "/" -%}
            {%- assign node_url_segments = node.url | split: "/" -%}
            <a class="{% if page_url_segments[1] == node_url_segments[1] %} active{% endif %}" href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a>
        </li>
        {%- endfor -%}
    </ul>
</nav>